﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Developer
{
    public partial class Developer : Form
    {
        bool appBarPanelToggled = false;
        public Developer()
        {
            InitializeComponent();
            appBarPanel.Size = new Size(100, 26);
            timeLabel.Text = "...";
            printDate();
        }
        //Events
        private void appBarPanel_Click(object sender, EventArgs e)
        {
            if (appBarPanelToggled)
            {
                appBarPanel.Size=new Size(100,26);
                appBarPanelToggled = false;
            }
            else
            {
                appBarPanel.Size = new Size(100, 100);
                appBarPanelToggled = true;
            }
            
        }
        private void Developer_Click(object sender, EventArgs e)
        {
            if (appBarPanelToggled)
            {
                appBarPanel.Size = new Size(100, 26);
                appBarPanelToggled = false;
            }
            else
            {
                appBarPanel.Size = new Size(100, 100);
                appBarPanelToggled = true;
            }
        }
        private void timeLabel_Click(object sender, EventArgs e)
        {
            if (appBarPanelToggled)
            {
                appBarPanel.Size = new Size(100, 26);
                appBarPanelToggled = false;
            }
            else
            {
                appBarPanel.Size = new Size(100, 100);
                appBarPanelToggled = true;
            }
        }
        void printDate()
        {
            DateTime today = DateTime.Today;
            StringBuilder text = new StringBuilder();
            if (today.Month == 1)
            {
                text.Append("January");
            }
            else if (today.Month == 2)
            {
                text.Append("Febuary");
            }
            else if (today.Month == 3)
            {
                text.Append("March");
            }
            else if (today.Month == 4)
            {
                text.Append("April");
            }
            else if (today.Month == 5)
            {
                text.Append("May");
            }
            else if (today.Month == 6)
            {
                text.Append("June");
            }
            else if (today.Month == 7)
            {
                text.Append("July");
            }
            else if (today.Month == 8)
            {
                text.Append("Augest");
            }
            else if (today.Month == 9)
            {
                text.Append("September");
            }
            else if (today.Month == 10)
            {
                text.Append("October");
            }
            else if (today.Month == 11)
            {
                text.Append("November");
            }
            else if (today.Month == 12)
            {
                text.Append("December");
            }
            else
            {

            }
            text.Append(" ");
            text.Append(today.Day);
            text.Append(", ");
            text.Append(today.Year - 2000);
            timeLabel.Text = text.ToString();
        }
        private void timeTimer_Tick(object sender, EventArgs e)
        {
            Application.DoEvents();
            if (appBarPanelToggled == false)
            {
                printDate();
            }
            else
            {
                timeLabel.Text = "Home Menu";
            }
        }
    }
}
